/* 
pc端部局：
宽、高、背景颜色，浮动。

reset.css去除浏览器默认格式。


问题：
1、如何在不设置margin ,padding时添加空白空间。如：购物车左侧。

经验和总结：
1、能不用绝对定位尽量不用绝对定位。
*/

/* 导航头部开始 */
.topbar{
    width: 100%;
    height: 40px;
    /* 高度与行高相同时正好上下居中显示 */
    line-height: 40px;
    background-color: #333;
    font-size: 12px;
}
.wrap{
    /* 宽度 */
    width: 1226px;
    /* 水平居中 */
    margin: 0 auto;
}
/* 整体左浮 */
.header-left{
    float: left;
}
/* 整体右浮 */
.header-right{
    float: right;
    margin: 0px 5px;
    text-align: center;
}
.topbar li{
    position: relative;
    float: left;
}
.topbar a{
    color: #b0b0b0;
    font-size: 12px;
}
.topbar a:hover{
    color: #fff;
}
.topbar .sep{
    margin: 0 0.3em;
    color: #424242;
}
.cart{
    position: relative;
    width: 120px;
    height: 40px;
    color: #b0b0b0;
    background-color: #424242;
    margin-left: 25px;
}
.login{
    padding: 0px 5px;
}
.msg{
    padding: 0px 10px;
}
/* 整体悬停，字体变色。>子属性 */
.cart:hover>a{
    color: #ff6700;

}
.cart:hover>.cart-list{

    height: 100px;
    z-index: 200;
}
.cart:hover{
    background-color: #fff;
    cursor: pointer;
}

/* 购物车等显示下拉
1）定位到正常的位置
2）隐藏
3）鼠标悬停显示


显示方法：
1）直接显示、隐藏
2）设置高度实现

可过渡动作：
1）颜色
2）数值
3）阴影
4）转换

*/
.cart-list{
    position: absolute;
    top:40px;
    right: 0px;
    color: #424242;
    background-color: #fff;
    box-shadow: 0 2px 10px rgb(0, 0, 0 ,.15);
    /* height为0，字会溢出，overflow设为hidden可实现隐藏 */
    height: 0px;
    overflow: hidden;
    /* 行高等于高时垂直居中 */
    line-height: 100px;
    width: 316px;
    transition: all .5s;
}
.download{
    position: absolute;
    left: 50%;
    /* 相对于自己 */
    margin-left: -62px;
    top: 40px;
    width: 124px;
    height: 0;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 5px #aaa;
    /* 居中 */
    text-align: center;
    color: #333;
}
.download a{
    display: block;
    color: #333;
    background-color: #fff;
}
.download a:hover{
    color: #333;
}
.download img{
    width: 90px;
    margin: 18px 0 12px ;
}
.download p{
    margin-top: -18px;
    font-size: 14px;
    line-height: 14px;
}
/* li元素被选中.download元素状态改变 */
.header-left li:hover>.download{   
    transition: all .3s;
    height: 142px;
    z-index: 210;
}

/* a为行内元素。块级可以包含行内，行内最好不要包含块级。 
.download img 和.download > img区别，前面选中所有后代img ,后面选中子代（第二代）。
*/

.triangle{
    height: 0;
    width: 0;
    border-bottom: 6px solid #fff;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    float: 50%;
    /* margin-left: 12px; */
    margin-top: -6px;
    display: none;
}
.header-left li:hover>.triangle{
    display: block;
}
/* 导航头部结束 */

/* 导航开始 */
/* 浮动可以让上下排列变为行内排列 */
.nav{
    position: relative;
    width: 100%;
    height: 100px;
    /* background-color: pink; */
}

.logo{
    float: left;
    width: 56px;  
    margin-top: 22px;
    height: 56px;
    /* background-color: royalblue; */
}
/* 设置图片宽为100%，使得图片刚好为父元素大小 */
.logo img{
    width: 100%;

}
.nav-item{
    float: left;
    width: 850px;
}
.nav-item>ul{
    /* background-color: aqua; */
    width: 1100px;
    height: 88px;
    padding-left: 187px;
    padding: 12px 0 0 30px;
}
.nav-item .category{
    float: left;
    width: 127px;
    height: 88px;
    padding: 0 15px 0 0;
}

.nav-item >ul >li{
    float: left;  
    color: #333;
    line-height: 70px; 
    height: 88px;
}
.nav-item>ul >li >a{
    font-size: 16px;
    padding: 26px 10px 38px 10px;
}
.nav-item>ul> li>a:hover{
    color: #ff6700;
}
.nav-item>ul> li:hover >.nav-item-list{
    display: block;
}
/* 导航下拉菜单开始 */
.nav-item-list{
    display: none;
    position: absolute;
    width: 100%;
    height: 229px;
    top: 100px;
    left: 0;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
    box-shadow: 0 3px 4px rgba(0, 0, 0 ,.18);
    z-index: 201;
}
.nav-item-list li{
    width: 180px;
    height: 166px;
    margin: 35px 12px 0 12px;
    float: left;
}
.nav-item-list li a p:last-child{
    color: #ff6700;
}
/* 最后一个li */
.nav-item-list li:last-child .nav-item-img{
    border: none;
}
.nav-item-img{
    width: 100%;
    height: 110px;
    border-right: 1px solid #b0b0b0;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.nav-item-list p{
    font: 14px/1.5 Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
}


/* 导航下拉菜单结束 */

/* 搜索开始 */
.search{
    float: right;
    width: 296px;
    height: 50px;
    margin-top: 25px;
    /* background-color: bisque; */
}
.search .content{
    float: left;
    width: 223px;
    height: 46px;
    padding: 0 10px;
    /* 属性生效有前后之差，下面的border-right必须在后面才能生效 */
    border: 1px solid #e0e0e0;
    border-right: none;
    /* 去除点击时的外边框 */
    outline: none;
    
}
.search>button{
    float: left;
    width: 52px;
    height: 48px;
    padding: 1px 4px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    outline: none;
}

.nav>.wrap{
    width: 1226px;
    height: 100px;
}

.search>button:hover {
    border-color: #b0b0b0;
    background-color: #ff6700;
    color: #fff;
}
/* +相邻选择 ‘+’选择器则表示某元素后相邻的兄弟元素，也就是紧挨着的，是单个的。而‘~’选择器则表示某元素后所有同级的指定元素，强调所有的。*/
.search .content:hover, .search .content:hover+button{
    border-color: #b0b0b0;
    transition:  1s;
}
.search:hover >.content{
    border-color: #b0b0b0;
}

.search .content:focus, .search .content:focus+button{
    border-color: #ff6700;
    transition:  1s;
}
/* 绝对定位 父元素reletive 子元素absolute*/
.search-list{
    display: none;
    width: 243px;
    height: 240px;
    border: 1px solid #ff6700;
    border-top: none;
    float: left;
    z-index: 220;
    background-color: #fff;
}
.search .content:focus ~.search-list{
    display: block;
}
.search-list >a{
    display: block;
    /* width: 100%; */
    height: 18px;
    padding:6px 15px;
    text-align: left;
}
.search-list >a:hover{
    background-color: #fafafa;
}

/* 搜索结束 */

/* 导航结束 */

/* banner开始 */

.banner .banner-box{
    position: relative; 
    width: 100%;
    height: 460px;
    /* background-color: pink; */
}
.banner .slider{
    width: 234px;
    height: 440px;
    padding-top: 20px;
    color: #fff;
    background: rgba(105,101,101,.6);

}
.banner .slider>ul>li{
    height: 42px;
    line-height: 42px;
    padding-left: 30px;
    padding-right: 20px;
}
.banner .slider>ul>li i{
    float: right;
}
.banner .slider>ul>li >a{
    color: #fff;
}

.banner .slidershow img{
    position: absolute; 
    top: 0;
    right: 0;
    float: right;
    width: 100%;
    z-index: -1;
    /* display:  none; */
}
.banner .slider>ul>li:hover{
    background-color: #ff6700;
}
.banner .slider>ul>li:hover .slider-list{
    display: block;
}
.slider-list{
    display: none;
    position: absolute;
    left: 234px;
    top: 0;
    width: 992px;
    height: 458px;
    z-index: 310;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 16px rgba(0, 0, 0 ,.18);
}
.slider-list>ul{
    width: 246px;
    height: 456px;
    float: left;
    padding:2px 0;
    /* background-color: pink; */
}
.slider-list>ul>li{
    width: 100%;
    height: 76px;
    /* border-box 设置内容长宽还是最外层长宽 */
    box-sizing: border-box;

    background-color: white; 
}.slider-list>ul>li img{
    float: left;
    margin-right: 10px;
}
/* ？？不知道视频的为什么直接垂直居中。而我用flex+height+line-height居中的 */
.slider-list>ul>li a{
    display: block;
    width: 225px;
    height: 40px;
    line-height: 40px;
    padding: 18px 20px;
    color: #333;
}
.slider-list>ul>li a .text{
    /* 此处必须浮动，浮动后会块显示，可以设高和行高 */
    float: left;
    height: 40px;
    line-height: 40px;
    width: 172px;
}
/* banner结束 */

/* 广告开始 */
.adv{
    width: 100%;
    height: 170px;
    padding: 16px 0 30px;
}

.adv >.wrap .adv-aside{
    width: 228px;
    height: 167px;
    padding: 3px;
    float: left;
    background-color: #5f5750;
}
.adv-aside >.aside-img{
    position: relative;
    float: left;
    margin-top: 18px;
    width: 70px;
    height: 64px;
    padding: 0 3px;
    text-align: center;
}
.adv-aside >.aside-img a{
    display: block;
    height: 100%;
    color: #fff;
}
.adv-aside >.aside-img img{
    width: 24px;
    height: 24px;
    padding: 0 23px;
}
.adv >.wrap >.adv-img{
    width: 316px;
    height: 170px;
    float: left;
    margin-left: 14px;
    background-color: #ff6700;
    transition: all .2s;
}
.adv-img img{
    height: 100%;
}
.adv .adv-img:hover{
    box-shadow: 0 2px 20px rgba(0, 0, 0 ,.18);
}

/* 水平 */
.adv-aside .row::after{
    position: absolute;
    content: "";
    left: 10px;
    width: 60px;
    height: 1px;
    background-color: red;
}
/* 竖直 */
.adv-aside .col::before{
    position: absolute;
    content: "";
    left: 2px;
    top: -5px;
    width: 1px;
    height: 60px;
    background-color: red;
}

/* 广告结束 */


/* 商品开始 */
/* 手机开始 */
.goods{
    width: 100%;
    background-color: #f5f5f5;
    padding-bottom: 26px;
}
.goods .phone-hot{
    padding-top:25px;
    height: 120px;
}
.box-hd{
    width: 100%;
    height: 58px;

}
.box-hd h2{
    float: left;
    height: 58px;
    line-height: 58px;
}
.box-hd .more{
    float: right;
    margin-top: 20px;
}
.box-hd .more i{
    border-radius: 50%;
    background-color: #b0b0b0;
    /* transform 动一下*/
}

.phone-main-hot{
    float: left;
    width: 234px;
    height: 614px;
    background-color: #fff;
}
.phone-main{
    height: 614px;
}
.phone-main>ul{
    float: left;
    width: 992px;
    height: 614px;

}
.phone-main>ul >li{
    width: 234px;
    height: 260px;
    margin-left: 14px;
    float: left;
    padding: 20px 0;
    background-color: #fff;
    margin-bottom: 14px;
}
.phone-main>ul >li a{
    text-align: center;
}
/* 手机结束 */

/* 商品结束 */

.footer .service{
    width: 100%;
    height: 25px;
    padding: 27px 0;
    border-bottom: 1px solid #e0e0e0;
}
.footer .service ul{
    width: 100%;
}
.footer .service li{
    float: left;
    width: 19.8%;
    height: 25px;
    line-height: 25px;
    text-align: center;
    border-right: 1px solid #e0e0e0;

}
.footer .service li:last-child{
    border-right: none;
}
.footer .service li a{
    text-align: center;
    font-size: 16px;
}


/* 链接开始 */
.footer{
    width: 100%;
    height: 332.5px;
}

.link{
    width: 100%;
    height: 172.5px;
    padding: 40px 0;
}
.link > .link-left{
    float: left;
    width: 974px;
    height: 252.5px;}
.link > .link-left >ul{
    width: 160px;
    height: 116.5px;
    float: left;
}
.link>.link-right{
    float: left;
    width: 251px;
    height: 111px;
    border-left: 1px solid #e0e0e0;
    text-align: center;
}
.footer .link .link-left >ul >.help{
    margin-bottom: 26px;
}
.footer .link .link-left >ul>li>a{
    height: 28px;
    line-height: 28px;
    color: #757575;
}
.footer .link .link-right .phone{
    width: 251px;
    height: 22px;
    margin-bottom: 5px;
    font-size: 22px;
    line-height: 1;
    color: #ff6700;
}

/* 链接结束 */

.site-info img{
    width: 83px;
    height: 28px;
}